package com.project.controller;

import com.project.bean.PieBean;
import com.project.service.IPieService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.time.LocalDate;
import java.util.List;

@RestController
@RequestMapping("pie")
public class PieController {
    @Autowired
    private IPieService pieService;

    @RequestMapping("findContentByData")
    public List<PieBean> findContentByData(LocalDate startDate, LocalDate endDate){
        return pieService.findContentByData(startDate, endDate);
    }

    @RequestMapping("findNPByData")
    public List<PieBean> findNPByData(LocalDate startDate, LocalDate endDate){
        return pieService.findNPByData(startDate, endDate);
    }
}
